package com.zsummer.demo.cloudseataservice1;

import com.zsummer.demo.cloudseataservice1.feign.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zsummer
 * @since 2022/2/14
 * 订单系统
 */

@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/post")
    public String order(@RequestParam("productName") String productName, @RequestParam("orderCnt") int orderCnt) {
        // 调用本地订单服务
        orderService.order(productName, orderCnt);
        return "success";
    }
}
